package org.linlinjava.litemall.db.service;

import org.linlinjava.litemall.db.dao.LitemallBaseMapper;
import org.linlinjava.litemall.db.domain.LitemallBase;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class LitemallBaseService {

    @Resource
    @Autowired
    private LitemallBaseMapper litemallBaseMapper;

    public String selectBybasetype(String basetype, int lv) {

        LitemallBase litemallBase = new LitemallBase(0, "", basetype, "", "", lv, null);
        return litemallBaseMapper.selectBybasetype(litemallBase);

    }


    public List<LitemallBase> selectall() {

        return litemallBaseMapper.selectall();

    }

    public LitemallBase selectbyid(int baseid) {


        return litemallBaseMapper.selectbyid(baseid);
    }


    public int updatebyid(LitemallBase litemallBase) {

        return litemallBaseMapper.updatebyid(litemallBase);
    }

    public String selectBYnumber(String basenumber) {

        return litemallBaseMapper.selectBYnumber(basenumber);
    }

    /**
     * 通过限定等级 寻找版本号
     * @return
     */
    public  LitemallBase  selectBylv(){
        return   litemallBaseMapper.selectBylv();

    }

    public   int   updatebanben(LitemallBase litemallBase){

        return  litemallBaseMapper.updatebanben(litemallBase);
    }

}
